<template>
  <div class="tag" :style="{color: getObj.color, backgroundColor: getObj.bgColor}">
    {{ getObj.name }}
  </div>
</template>

<script>
export default {
  name: 'CommonStatusTag',
  props: {
    status: [String, Number],
    statusList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },
  computed: {
    getObj() {
      const find = this.statusList.find(e => e.value == this.status)
      return find || {}
    }
  },
  methods: {}
}
</script>

<style scoped lang="scss">
.tag  {
    width: 64px;
    background: #FFF2CF;
    font-size: 14px;
    line-height: 14px;
    font-family: Source Han Sans CN;
    font-weight: bold;
    text-align: center;
    padding: 7px 0;
}
</style>
